#ifndef COORDITEM_H
#define COORDITEM_H

#include "global.h"

#include <QGraphicsItem>
#include <QPainter>

class GraphWidget;
class QString;

class CoordItem : public QGraphicsItem
{
public:
    CoordItem(GraphWidget *graphWidget);

    QRectF boundingRect() const;
    void setNewCoord(QPointF newCoord);
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
    int type() const {return TEXTTYPE;}
    QString getText();

private:
    QString text;
    GraphWidget *graph;
};

#endif // COORDITEM_H
